-- Debugging functions

if (DEBUGGER_ON) then
    require 'debugger'
else
    -- If the debugger is off, we need to handle stray 'pause' commands.
    pause = function() end
end

function printCallerInformation(evt)
    local funcinfo = debug.getinfo(2) -- get the function we just entered

    --[[
    for k,v in pairs(funcinfo) do
        print(k,v)
    end --]]
    
    print(funcinfo.name .. ":" ..funcinfo.short_src .. "." .. funcinfo.linedefined)
    
    
end

--debug.sethook(printCallerInformation, "c")

function trace()
    print(debug.traceback())
end